//
//  SEXylinkBottomToolBarView.m
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/6/30.
//

#import "SEXylinkBottomToolBarView.h"

@implementation SEXylinkBottomToolBarView

- (IBAction)chatModeBtnAction:(UIButton *)sender {
    [self buttonAction:sender];
}

- (IBAction)muteBtnAction:(UIButton *)sender {
    [self buttonAction:sender];
}

- (IBAction)switchCameraBtnAction:(UIButton *)sender {
    [self buttonAction:sender];
}

- (IBAction)hangupBtnAction:(UIButton *)sender {
    [self buttonAction:sender];
}

- (void)buttonAction:(UIButton *)sender {
    sender.selected = !sender.selected;
    if (self.clickEventBlock) {
        self.clickEventBlock(sender);
    }
}

-(void)updateBtnSelectedStatus:(BOOL)selected itemType:(SEXylinkBottomToolBarActionType)type{
    UIButton *btn = (UIButton *)[self viewWithTag:type];
    if (btn) {
        btn.selected = selected;
    }
}

@end
